home *** CD-ROM | disk | FTP | other *** search
/ MIDICraft's MIDINET CD-ROM / MIDICraft's MIDINET CD-ROM.iso / DOSUTILS / MIDI2HEX.DOC < prev    next >
Text File  |  1996-08-27  |  4KB  |  131 lines

  1.         ******************************
  2.             MIDI2HEX v1.1
  3.     
  4.            midi binaries to hexdump
  5.               by Guenter Nagler 
  6.                 1995 
  7.           (gnagler@ihm.tu-graz.ac.at)
  8.         ******************************
  9.  
  10. [1] BACKGROUND
  11. I wrote some midi utilities that produced midi. 
  12. For debugging purpose needed a utility to see a hexadecimal view 
  13. of the file that supports midi command seperation.
  14.  
  15. Now I use this utility to see why some of the midi files that I get 
  16. are broken.
  17.  
  18. This utility shows internals of midi, how byte sequences build
  19. midi commands. See MIDI2TXT converter for further midi details.
  20.  
  21. [2] FILES DESCRIPTION
  22.  
  23. MIDI2HEX.EXE.........converter program
  24. MIDI2HEX.DOC.........this file, showing usage of MIDI2HEX.EXE
  25. MIDIIO.HPP..........header file for a c++ midi parser
  26. MIDIIO.CPP..........source code for a c++ midi parser
  27. MIDI2HEX.CPP.........c++ source code for midi to text
  28. MIDI2HEX.MAK.........make file for project 
  29. MIDI2HEX.CFG.........compiler options for make
  30. MIDI2HEX.PRJ.........project for borland c++ compilers
  31. only MIDI2HEX.EXE is required to run program
  32.  
  33. [3] COPYRIGHT
  34.  
  35. MIDI2HEX (c) 1995 was created by Guenter Nagler.
  36.  
  37. MIDI2HEX is free and may be used as you wish with this one exception:
  38.  
  39.     You may NOT charge any fee or derive any profit for distribution
  40.     of MIDI2HEX.  Thus, you may NOT sell or bundle MIDI2HEX with any 
  41.     product in a retail environment (shareware disk distribution, CD-ROM,
  42.     etc.) without permission of the author.
  43.  
  44. You may give MIDI2HEX to your friends, upload it to a BBS, or ftp it to
  45. another internet site, as long as you don't charge anything for it.
  46.  
  47. [4] DISCLAIMER
  48.  
  49. MIDI2HEX was designed to handle 100% compatible standard midi files.
  50. So I give no guarantees of the results, especially with non 100% 
  51. compatible midi files.
  52. If you find a midi file that you think to be 100% compatible midi
  53. that is not correctly converted, please send a sample file to 
  54. gnagler@ihm.tu-graz.ac.at . 
  55.  
  56. Use MIDI2HEX at your own risk.  Anything you do with MIDI2HEX is your
  57. responsibility, and not the author's.  Any damage caused to any person,
  58. computer, software, hardware, company, or business by running MIDI2HEX 
  59. is your responsibility, and the author will not be liable.
  60.  
  61. If you don't understand these terms, or are not sure of something, or
  62. are afraid something bad might come of using MIDI2HEX, don't  use  it!
  63. You are here forewarned.
  64.  
  65. [5] INSTALLATION 
  66.  
  67. [MSDOS]
  68.  
  69.   Simply copy MIDI2HEX.EXE in a directory that is in your path.
  70.   When you start the program without arguments
  71.  
  72.   C:\> MIDI2HEX
  73.  
  74.   you should get the usage text (see next section)
  75.  
  76. [UNIX]
  77. compile sources with your C++ compiler (e.g. GNU Compiler g++):
  78.  
  79. g++ -o midi2hex midi2hex.cpp midiio.cpp 
  80.  
  81. and run program
  82.  
  83. $ midi2hex
  84.  
  85. [6] USAGE
  86.  
  87. usage: MIDI2HEX  file.mid [> file.txt]
  88.  
  89. The parts in brackets [...] are optional.
  90.  
  91. The text output is normally written to screen but can be relinked
  92. to a file  (> filename.txt)  or a printer (> prn). See your MS-DOS/UNIX
  93. manual for usage of  > and >> operators.
  94.  
  95. [7] A sample of resulting text output
  96.  
  97. command> midi2hex gs_reset.mid
  98. MThd 00000006
  99.   0000 0001 0078  // format, trackcount, resolution
  100.  
  101. MTrk 0000003C
  102. 0016: 00    FF  58 04  04 02 18 08 // tact
  103. 001E: 00    FF  51 03  07 A1 20 // tempo
  104. 0025: 00    F0  0A 41 10 42 12 40 00 7F 00 41 F7 // sysex
  105. 0032: 38    F0  19 41 10 42 12 40 01 10 02 02 02 02 02 02 02 00 00 00 00 02 02 02 02 02 17 F7 // sysex
  106. 004E: 3A    FF  2F 00  // end of track
  107.  
  108. The header starts at line containing MThd. The values are specified 
  109. hexadezimal ( base is 16 using digits 0123456789ABCDEF, e.g. 00 = 0, FF = 255, 100 = 256, etc.)
  110.  
  111. Each midi track starts with MTrk and is followed by midi command lines in hex:
  112. fileoffset: pause       command parameters // commandname
  113.  
  114. The pauses are midi delta values (dynamic large values, 
  115. see midi documentation for details, you find it by ftp at
  116. ftp://ftp.cs.ruu.nl/pub/MIDI/DOC).
  117.  
  118. command> midi2hex gs_reset.mid > gs_reset.hex
  119.  
  120. This writes the above output text into the file gs_reset.hex
  121.  
  122. [8] SUGGESTIONS / COMMENTS / BUG REPORTS / QUESTIONS
  123.  
  124.          WWW:    http://hgiicm.tu-graz.ac.at/Cpub
  125.           contains all my dos/unix midi programs
  126.          EMAIL:  gnagler@ihm.tu-graz.ac.at
  127.  
  128. [9] CHANGES
  129. v1.0 to v1.1:
  130.   * bug fixed:  meta events were limited to max. 127 bytes
  131.